import {
    jwtServerInstance
} from "../index";
import qs from 'qs'

export const getEnterprise = (queryform) => {
    return jwtServerInstance.request({
        url: '/wechatEnterprise/query',
        method: 'post',
        data: qs.stringify({
            enterpriseName: queryform.enterpriseName
        })
    })
}

export const addEnterprise = (enterpriseForm) => {
    return jwtServerInstance.request({
        url: '/wechatEnterprise/addEnterprise',
        method: 'post',
        data: enterpriseForm
    })
}

export const updateEnterprise = (enterpriseForm) => {
    return jwtServerInstance.request({
        url: '/wechatEnterprise/updateEnterprise',
        method: 'post',
        data: enterpriseForm
    })
}

export const deleteEnterprise = (id) => {
    return jwtServerInstance.request({
        url: '/wechatEnterprise/deleteEnterprise',
        method: 'post',
        data: qs.stringify({
            id: id
        })

    })
}